//
//  SignModel.m
//  PublicInfo
//
//  Created by enghou on 2018/2/2.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "SignModel.h"
#import "SignItemModel.h"
@implementation SignModel

-(instancetype)initWithSourceDict:(NSDictionary *)dict listItemClass:(Class)cls{
    self = [super initWithSourceDict:dict listItemClass:cls];
    if (self) {
        NSDictionary *data = [dict objectForKey:@"data"];
        self.monthcount = [[data objectForKey:@"monthCount"]integerValue];
        self.weekcount = [[data objectForKey:@"weekCount"]integerValue];
    }
    return self;
}

-(void)getContent:(NSDictionary *)dict withClass:(Class)cls{
    NSDictionary *data = [dict objectForKey:@"data"];
    NSArray *records = [data objectForKey:@"records"];
    NSMutableArray *tempArr = [NSMutableArray array];
    for (NSDictionary *item in records) {
        SignItemModel *model = [[SignItemModel alloc]initWithSource:item];
        [tempArr addObject:model];
    }
    self.list = [tempArr copy];
}
@end
